<script setup>
import { onBeforeMount,ref } from 'vue';
import emitter from '../libs/bus.js'
let x = ref('')
onBeforeMount(()=>{
    emitter.on('btn',(data)=>{
        x.value = data
    })
})
// 加
</script>

<template>
<div>
    <h1>b组件:接受</h1>
    <div>{{x}}</div>
</div>
</template>

<style scope>

</style>
